<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The SplSubject interface</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="splobserver.update.html">SplObserver::update</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="splsubject.attach.html">SplSubject::attach</a></div>
 <div class="up"><a href="spl.misc.html">各种类及接口</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="class.splsubject" class="reference">

 <h1 class="title">The SplSubject interface</h1>
 

 <div class="partintro"><p class="verinfo">(PHP 5 &gt;= 5.1.0)</p>


  <div class="section" id="splsubject.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    The <strong class="classname">SplSubject</strong> interface is used alongside
    <a href="class.splobserver.html" class="classname">SplObserver</a> to implement the Observer Design Pattern.
   </p>
  </div>


  <div class="section" id="splsubject.synopsis">
   <h2 class="title">接口摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <strong class="classname">SplSubject</strong>
     </span>
     {</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">abstract</span> <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="splsubject.attach.html" class="methodname">attach</a></span>
    ( <span class="methodparam"><span class="type"><a href="class.splobserver.html" class="type SplObserver">SplObserver</a></span> <code class="parameter">$observer</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">abstract</span> <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="splsubject.detach.html" class="methodname">detach</a></span>
    ( <span class="methodparam"><span class="type"><a href="class.splobserver.html" class="type SplObserver">SplObserver</a></span> <code class="parameter">$observer</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">abstract</span> <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="splsubject.notify.html" class="methodname">notify</a></span>
    ( <span class="methodparam">void</span>
   )</div>

   }</div>


  </div>

 </div>

 






















<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="splsubject.attach.html">SplSubject::attach</a> — Attach an SplObserver</li><li><a href="splsubject.detach.html">SplSubject::detach</a> — Detach an observer</li><li><a href="splsubject.notify.html">SplSubject::notify</a> — Notify an observer</li></ul>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="splobserver.update.html">SplObserver::update</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="splsubject.attach.html">SplSubject::attach</a></div>
 <div class="up"><a href="spl.misc.html">各种类及接口</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
